﻿import request from '/@/utils/request';
enum Api {
  AddMaintenances = '/api/maintenances/add',
  DeleteMaintenances = '/api/maintenances/delete',
  UpdateMaintenances = '/api/maintenances/update',
  PageMaintenances = '/api/maintenances/page',
  DetailMaintenances = '/api/maintenances/detail',
  GetOccupantAuditRepairDropdown = '/api/maintenances/OccupantAuditRepairDropdown',
  GetHouselocationDropdown = '/api/maintenances/HouselocationDropdown',
  GetTwoCategoriesTicketsDropdown = '/api/maintenances/TwoCategoriesTicketsDropdown',
  GetEmployeeTakersDropdown = '/api/maintenances/EmployeeTakersDropdown',
}

// 增加报修管理
export const addMaintenances = (params?: any) =>
	request({
		url: Api.AddMaintenances,
		method: 'post',
		data: params,
	});

// 删除报修管理
export const deleteMaintenances = (params?: any) => 
	request({
			url: Api.DeleteMaintenances,
			method: 'post',
			data: params,
		});

// 编辑报修管理
export const updateMaintenances = (params?: any) => 
	request({
			url: Api.UpdateMaintenances,
			method: 'post',
			data: params,
		});

// 分页查询报修管理
export const pageMaintenances = (params?: any) => 
	request({
			url: Api.PageMaintenances,
			method: 'post',
			data: params,
		});

// 详情报修管理
export const detailMaintenances = (id: any) => 
	request({
			url: Api.DetailMaintenances,
			method: 'get',
			data: { id },
		});

export const getOccupantAuditRepairDropdown = () =>
		request({
		url: Api.GetOccupantAuditRepairDropdown,
		method: 'get'
		});
export const getHouselocationDropdown = () =>
		request({
		url: Api.GetHouselocationDropdown,
		method: 'get'
		});
export const getTwoCategoriesTicketsDropdown = () =>
		request({
		url: Api.GetTwoCategoriesTicketsDropdown,
		method: 'get'
		});
export const getEmployeeTakersDropdown = () =>
		request({
		url: Api.GetEmployeeTakersDropdown,
		method: 'get'
		});

